<?php
/**
 * Created by PhpStorm.
 * User: asdf
 * Date: 2021/9/23
 * Time: 21:27
 */

namespace Extentions\login_check;
use Extentions\mysql\Db;

class login_check{

    private static $instance;
    private static $Db;

    private function session_check(){

    }

    public function usercheck1($uname,$passwd){
        $sql = "select uname,passwd from blog.user where uname=$uname and passwd=$passwd";
        return self::$Db->fetchall($sql);
    }

    private function __construct()
    {
        self::$Db = Db::instance();
    }

    public static function Newinstance(){
        if(!self::$instance instanceof self){
            self::$instance = new self();
        }
        return self::$instance;
    }

    private function __clone()
    {
        // TODO: Implement __clone() method.
    }


}